package com.dfiov.cloud.msmtools.service.feign;

import com.dfiov.cloud.msmtools.vo.AccountLoginAuthVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;


/**
 * Title
 *
 * @author xuyz
 * @description 调用dbuser服务
 * @create 2025/2/20 18:51
 */
//@FeignClient(name = "${dbuser.name}", url = "http://localhost:8080/", fallback = MsAccountLoginAuthFallback.class)
//@FeignClient(name = "dbuser", url = "http://dbuser.uat.dftccloud.t.home/")
//@FeignClient(name = "dbuser", url = "http://dbuser.perf.dftccloud.t.home")
//@FeignClient(name = "dbuser", url = "http://dbuser.paas.dftccloud.t.home")
@FeignClient(name = "dbuser")
public interface MsAccountLoginAuthFeign {
    @RequestMapping(value = "/api/baseLoginAccountAuth/search/findBySid", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
    AccountLoginAuthVo findBySid(@RequestParam("sid") Long sid);

    @RequestMapping(value = "/api/baseLoginAccountAuth/{sid}", method = RequestMethod.PUT, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
    AccountLoginAuthVo edit(@PathVariable("sid") Long sid, @RequestBody AccountLoginAuthVo entity);

    @RequestMapping(value = "/api/baseLoginAccountAuth/search/findByLoginTypeAndLoginId", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
    AccountLoginAuthVo findByLoginTypeAndLoginId(@RequestParam("loginType") Short loginType,
                                                 @RequestParam("loginId") String loginId, @RequestParam("projectId") String projectId);

}
